<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.9.1"/>
<title>RaftLib: raft::kernel Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">RaftLib
   &#160;<span id="projectnumber">0.3a</span>
   </div>
   <div id="projectbrief">C++ Stream Processing Template Library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.9.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespaceraft.html">raft</a></li><li class="navelem"><a class="el" href="classraft_1_1kernel.html">kernel</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="#pro-static-attribs">Static Protected Attributes</a> &#124;
<a href="#friends">Friends</a> &#124;
<a href="classraft_1_1kernel-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">raft::kernel Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div>  </div>
</div><!--header-->
<div class="contents">
<div class="dynheader">
Inheritance diagram for raft::kernel:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="classraft_1_1kernel__inherit__graph.svg" width="264" height="299"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<div class="dynheader">
Collaboration diagram for raft::kernel:</div>
<div class="dyncontent">
<div class="center"><div class="zoom"><iframe scrolling="no" frameborder="0" src="classraft_1_1kernel__coll__graph.svg" width="100%" height="600"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div></div>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a57aa6c7842f594d1522fb1c127fc4588"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classraft_1_1kernel.html#a57aa6c7842f594d1522fb1c127fc4588">kernel</a> ()</td></tr>
<tr class="separator:a57aa6c7842f594d1522fb1c127fc4588"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8c275f04f04b99d77fc4639a053112c8"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classraft_1_1kernel.html#a8c275f04f04b99d77fc4639a053112c8">kernel</a> (void *const ptr, const std::size_t nbytes)</td></tr>
<tr class="separator:a8c275f04f04b99d77fc4639a053112c8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a05094286d7577360fb1b91c91fc05901"><td class="memItemLeft" align="right" valign="top">virtual raft::kstatus&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classraft_1_1kernel.html#a05094286d7577360fb1b91c91fc05901">run</a> ()=0</td></tr>
<tr class="separator:a05094286d7577360fb1b91c91fc05901"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a71bfffbbb3d40949e19be32e3d8f467f"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classraft_1_1kernel.html">raft::kernel</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classraft_1_1kernel.html#a71bfffbbb3d40949e19be32e3d8f467f">clone</a> ()</td></tr>
<tr class="separator:a71bfffbbb3d40949e19be32e3d8f467f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2376ee5c5d413955db3f017fb707a6df"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2376ee5c5d413955db3f017fb707a6df"></a>
std::size_t&#160;</td><td class="memItemRight" valign="bottom"><b>get_id</b> ()</td></tr>
<tr class="separator:a2376ee5c5d413955db3f017fb707a6df"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:adc0c9673065432e5613cc424ae44ddc6"><td class="memTemplParams" colspan="2"><a class="anchor" id="adc0c9673065432e5613cc424ae44ddc6"></a>
template&lt;class T , class... Args&gt; </td></tr>
<tr class="memitem:adc0c9673065432e5613cc424ae44ddc6"><td class="memTemplItemLeft" align="right" valign="top">static <a class="el" href="classraft_1_1kernel.html">kernel</a> *&#160;</td><td class="memTemplItemRight" valign="bottom"><b>make</b> (Args &amp;&amp;...params)</td></tr>
<tr class="separator:adc0c9673065432e5613cc424ae44ddc6"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:ab206ff6ee1b729ab8875e181cbef227f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab206ff6ee1b729ab8875e181cbef227f"></a>
virtual std::size_t&#160;</td><td class="memItemRight" valign="bottom"><b>addPort</b> ()</td></tr>
<tr class="separator:ab206ff6ee1b729ab8875e181cbef227f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abd7f3bf1f689840f7d61f472f520c258"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classraft_1_1kernel.html#abd7f3bf1f689840f7d61f472f520c258">lock</a> ()</td></tr>
<tr class="separator:abd7f3bf1f689840f7d61f472f520c258"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7966dcabb0ed65ac52f6f78918256861"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classraft_1_1kernel.html#a7966dcabb0ed65ac52f6f78918256861">unlock</a> ()</td></tr>
<tr class="separator:a7966dcabb0ed65ac52f6f78918256861"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:a6edbe35a56409d402e719b3ac36d6554"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_port.html">Port</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classraft_1_1kernel.html#a6edbe35a56409d402e719b3ac36d6554">input</a> = { this }</td></tr>
<tr class="separator:a6edbe35a56409d402e719b3ac36d6554"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1c65cc76ecaa8880ba527e5a146ca4ba"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1c65cc76ecaa8880ba527e5a146ca4ba"></a>
<a class="el" href="class_port.html">Port</a>&#160;</td><td class="memItemRight" valign="bottom"><b>output</b> = { this }</td></tr>
<tr class="separator:a1c65cc76ecaa8880ba527e5a146ca4ba"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-static-attribs"></a>
Static Protected Attributes</h2></td></tr>
<tr class="memitem:a98e05f7418c208e28b9112e92df7eccf"><td class="memItemLeft" align="right" valign="top">static std::size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classraft_1_1kernel.html#a98e05f7418c208e28b9112e92df7eccf">kernel_count</a></td></tr>
<tr class="separator:a98e05f7418c208e28b9112e92df7eccf"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="friends"></a>
Friends</h2></td></tr>
<tr class="memitem:a1045638a7591b3c72cd145fc541d6478"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1045638a7591b3c72cd145fc541d6478"></a>
class&#160;</td><td class="memItemRight" valign="bottom"><b>::MapBase</b></td></tr>
<tr class="separator:a1045638a7591b3c72cd145fc541d6478"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a126c9d6caad2646cb2c25898b955c79a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a126c9d6caad2646cb2c25898b955c79a"></a>
class&#160;</td><td class="memItemRight" valign="bottom"><b>::Map</b></td></tr>
<tr class="separator:a126c9d6caad2646cb2c25898b955c79a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a59b0d31ff28240338a2b6e682030ca3c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a59b0d31ff28240338a2b6e682030ca3c"></a>
class&#160;</td><td class="memItemRight" valign="bottom"><b>::Schedule</b></td></tr>
<tr class="separator:a59b0d31ff28240338a2b6e682030ca3c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a24755791643232aebfeedaa4ff0ecf03"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a24755791643232aebfeedaa4ff0ecf03"></a>
class&#160;</td><td class="memItemRight" valign="bottom"><b>::GraphTools</b></td></tr>
<tr class="separator:a24755791643232aebfeedaa4ff0ecf03"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa3a6c191bed2aef9502f837b67e786b2"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa3a6c191bed2aef9502f837b67e786b2"></a>
class&#160;</td><td class="memItemRight" valign="bottom"><b>::kernel_container</b></td></tr>
<tr class="separator:aa3a6c191bed2aef9502f837b67e786b2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae75d52e84ecfc11bcaa43dd9fe149a2f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae75d52e84ecfc11bcaa43dd9fe149a2f"></a>
class&#160;</td><td class="memItemRight" valign="bottom"><b>::basic_parallel</b></td></tr>
<tr class="separator:ae75d52e84ecfc11bcaa43dd9fe149a2f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a57aa6c7842f594d1522fb1c127fc4588"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">kernel::kernel </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>default constructor</p>
<p>default </p>

</div>
</div>
<a class="anchor" id="a8c275f04f04b99d77fc4639a053112c8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">kernel::kernel </td>
          <td>(</td>
          <td class="paramtype">void *const&#160;</td>
          <td class="paramname"><em>ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::size_t&#160;</td>
          <td class="paramname"><em>nbytes</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>in-place allocation</p>
<p>existing memory </p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a71bfffbbb3d40949e19be32e3d8f467f"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classraft_1_1kernel.html">raft::kernel</a>* raft::kernel::clone </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>clone - used for parallelization of kernels, if necessary sub-kernels should include an appropriate copy constructor so all class member variables can be set. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">other,T&amp;</td><td>- reference to object to be cloned </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>kernel* - takes base type, however is same as allocated by copy constructor for T. </dd></dl>

</div>
</div>
<a class="anchor" id="abd7f3bf1f689840f7d61f472f520c258"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void kernel::lock </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>does nothing, just need a base impl </p>

</div>
</div>
<a class="anchor" id="a05094286d7577360fb1b91c91fc05901"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual raft::kstatus raft::kernel::run </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>run - function to be extended for the actual execution. Code can be executed outside of the run function, i.e., with any function call, however the scheduler will only call the run function so it must initiate any follow-on behavior desired by the user. </p>

<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="classraft_1_1kernel_a05094286d7577360fb1b91c91fc05901_icgraph.svg" width="520" height="38"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
</p>

</div>
</div>
<a class="anchor" id="a7966dcabb0ed65ac52f6f78918256861"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void kernel::unlock </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>does nothing, just need a base impl </p>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a class="anchor" id="a6edbe35a56409d402e719b3ac36d6554"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_port.html">Port</a> raft::kernel::input = { this }</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>PORTS - input and output, use these to interact with the outside world. </p>

</div>
</div>
<a class="anchor" id="a98e05f7418c208e28b9112e92df7eccf"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::size_t kernel::kernel_count</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>NOTE: doesn't need to be atomic since only one thread will have responsibility to to create new compute kernels. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="kernel_8hpp_source.html">kernel.hpp</a></li>
<li>kernel.cpp</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Mon Oct 12 2015 12:16:50 for RaftLib by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.9.1
</small></address>
</body>
</html>
